package domain.penum;

/**
 * 
 * @ClassName: EstablishmentEnum
 * @Description: 设备枚举
 * @author chenchao
 * @date 2014年1月22日 下午2:09:21
 * 
 */
public enum EstablishmentEnum {
	WARTER("01", "水"), ELECTRICITY("02", "电"), GASS("03", "煤气/天然气"), TV("04",
			"有线电视"), FIRIDGE("05", "冰箱"), WASHINGMACHINE("06", "洗衣机"), AIRCODITIONAL(
			"07", "空调"), MICROWAVE("08", "微波炉"), WATERHEATER("09", "热水器"), HEATER(
			"10", "暖气"), ADSL("11", "宽带"), TELPHONE("12", "电话 "), ELEVATOR(
			"13", "电梯"), BASEROOM("14", "储藏室/地下室"), COOKINGUTENSIL("15", "灶具"), FURNITURE(
			"16", "家具"), GARDEEN("17", "露台/花园"), PARKING("18", "停车位"), PROPERTY(
			"19", "物业服务"), TALL("20", "商务中心"), YUM("21", "建设设备");

	private String key;
	private String name;

	private EstablishmentEnum(String key, String name) {
		this.key = key;
		this.name = name;
	}

	// 普通方法
	public static String getName(String index) {
		for (EstablishmentEnum c : EstablishmentEnum.values()) {
			if (c.getKey().equals(index)) {
				return c.name;
			}
		}
		return "";

	}

	/**
	 * @return the key
	 */
	public String getKey() {
		return key;
	}

	/**
	 * @param key
	 *            the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
}
